<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box{
        z-index: 5;
        position: relative;
        float: left;
        margin-left: 18px;
        width: 372px;
        height: 254px;
        overflow: hidden;
    }
    .box a{
        z-index: 5;
        position: absolute;
        top: 118px;
        width: 18px;
        height: 32px;
        transition: all 0.3s;
    }
    .prev{
        left: 0;
        background: url(https://vr1.6rooms.com/tao/i/b1/7004789f991203600cc727938827a9d2.png) no-repeat;
    }
    .next{
        right: 0;
        background: url(https://vr1.6rooms.com/tao/i/v7/8d5be75ad94f301822de2da51cd901c0.png) no-repeat;
    }
    .box ul{
        width: 774px;
    transform: translateX(0px);
    margin: 0;
    padding: 0;
    }
    .box ul li{
        float: left;
    /* margin: 0 2px 5px; */
    /* width: 82px; */
    text-align: center;
    }
    ul li{
        list-style: none;
    }
    .red{
        background-color: red;
        width: 110px;
        height: 250px;
        /* margin-right: 20px; */
    }
    .blue{
        background-color: blue;
        width: 110px;
        height: 250px;
        /* margin-right: 20px; */
    }
    .yellow{
        background-color: yellow;
        width: 110px;
        height: 250px;
        /* margin-right: 20px; */
    }
    .dark{
        background-color: black;
        width: 110px;
        height: 250px;
        /* margin-right: 20px; */
    }
</style>
<body>
    <div class="box">
        <a class="prev">左</a>
        <a class="next">右</a>
        <ul>
            <li class="red" data-uid="1"></li>
            <li class="red" data-uid="2"></li>
            <li class="red" data-uid="3"></li>
            <li class="blue" data-uid="4"></li>
            <!-- <li class="blue"></li>
            <li class="blue"></li>
            <li class="yellow"></li>
            <li class="yellow"></li>
            <li class="yellow"></li>
            <li class="dark"></li>
            <li class="dark"></li>
            <li class="dark"></li> -->
        </ul>
    </div>
</body>
<script src="./jquery-1.11.3.min.js"></script>
<script>
    var uids = $('.box').find('li');
    var uids2 = [];
    uids.each(function(i,item){

        console.log(item)
        console.log($(this).attr('data-uid'))
        var nowuid = $(this).attr('data-uid')
        uids2.push(nowuid);
    })
    console.log(uids2);
</script>
</html>